/* Copyright 2008 Bas van den Berg
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef CONFIG_H
#define CONFIG_H

#define seconds(a) Config::PULSE_PER_SEC*a
#define minutes(a) Config::PULSE_PER_SEC*60*a
#define hours(a) Config::PULSE_PER_SEC*60*60*a

namespace Chronos {

struct Config {
// Generic settings
    static const unsigned int PORT = 6666;
    static const unsigned int PULSE_PER_SEC = 10;

// Connection settings
    static const unsigned int LOGIN_TIMEOUT = seconds(15);
    static const unsigned int SESSION_ACTIVE_TIMEOUT = minutes(5);
    static const unsigned int SESSION_IDLE_TIMEOUT = minutes(10);
    static const unsigned int SESSION_DISCONNECT_TIMEOUT = minutes(2);

// Playersettings
    static const int MAX_ALIASES = 100;
    static const unsigned int SESSION_AUTOSAVE = minutes(10);

// World settings
	static const unsigned int CORPSE_VANISH_TIME = 60;
};

}

#endif

